<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改预约信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${orderInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">专家名称：</label>
                <div class="col-sm-8">
                    <select name="pid" class="form-control m-b" th:with="type=${@doctor.selectDoctorInfoList()}">
                        <option th:each="doctor : ${type}" th:text="${doctor.name}" th:value="${doctor.id}"  th:field="*{pid}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预约时间：</label>
                <div class="col-sm-8">
                    <select name="day" class="form-control m-b" th:with="type=${@DutyInfo.getDateList()}">
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${#dates.format(dict, 'yyyy-MM-dd')}" th:value="${#dates.format(dict, 'yyyy-MM-dd')}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预约状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('duty_record_status')}">
                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电话：</label>
                <div class="col-sm-8">
                    <input name="number" th:field="*{number}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户名称：</label>
                <div class="col-sm-8">
                    <input name="uid" th:field="*{uid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预约时段：</label>
                <div class="col-sm-8">
                    <select name="time" class="form-control m-b" th:with="type=${@dict.getType('duty_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{time}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务名称：</label>
                <div class="col-sm-8">
                    <select name="sid" class="form-control m-b" th:with="type=${@server.selectServerTypeList()}">
                        <option th:each="server : ${type}" th:text="${server.CName}" th:value="${server.id}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "order/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
            }
        }
    </script>
</body>
</html>